package com.jprocms.module.cms.api.dto;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Objects;

@NoArgsConstructor
@AllArgsConstructor
@Data
public class IpRangeVO implements Serializable {
    private static final long serialVersionUID = 1L;
    private String from;
    private String to;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        IpRangeVO ipRangeVO = (IpRangeVO) o;
        return Objects.equals(from, ipRangeVO.from) && Objects.equals(to, ipRangeVO.to);
    }

    @Override
    public int hashCode() {
        return Objects.hash(from, to);
    }
}
